package luogu;

import java.util.Scanner;

public class Main1303 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String a = sc.nextLine();
        String b = sc.nextLine();

        String result = multiply(a, b);
        System.out.println(result);
    }

    public static String multiply(String a, String b) {
        int m = a.length();
        int n = b.length();
        int[] result = new int[m + n];

        if (a.equals("0") || b.equals("0")) {
            return "0";
        }

        for (int i = m - 1; i >= 0; i--) {
            int x = a.charAt(i) - '0';
            for (int j = n - 1; j >= 0; j--) {
                int y = b.charAt(j) - '0';
                int process = x * y;

                int sum = result[i + j + 1] + process;
                result[i + j + 1] = sum % 10;     //当前位
                result[i + j] += sum / 10;        //进位
            }
        }

        StringBuilder sb = new StringBuilder();
        for (int digit : result) {
            if (!(sb.length() == 0 && digit == 0)) {
                sb.append(digit);
            }
        }
        return sb.length() == 0 ? "0" : sb.toString();
    }
}
